#include <iostream>

using namespace std;

template <typename T> void print(const T *p, int size) {
  for (int i = 0; i < size; ++i)
    cout << p[i] << "  ";
  cout << "\n";
}

int main() {
  // 会对所有值进行默认初始化  指名的使用相应值
  // double *a{new double[10]{}};
  // int *b{new int[10]{5}};
  // cout << a[9] << "\n" << b[3] << "\n";
  // cout << b[0] << "\n";

  int arr[2]{0, 1};
  int(&arr2)[2] = arr;
  arr2[1] = 3;
  cout << arr[1] << endl;

  int vec[2][2]{0, 1, 2, 3};

  print(vec, 4);
  print(arr, 2);
  return 0;
}
